home *** CD-ROM | disk | FTP | other *** search
- 124
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- SetFilePermissions
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Macintosh
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baSetFilePermissions sets the UNIX permissions of a file.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baSetFilePermissions( FileName, User, Permissions )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String, string, string.
- --- RECORDSEPARATOR ---
- FileName is the file to set the attribute of.
- --- RECORDSEPARATOR ---
- User is the user type to set. Can be one of:
- --- RECORDSEPARATOR ---
- "u"
- --- RECORDSEPARATOR ---
- the present user
- --- RECORDSEPARATOR ---
- "g"
- --- RECORDSEPARATOR ---
- the current group
- --- RECORDSEPARATOR ---
- "o"
- --- RECORDSEPARATOR ---
- all other users
- --- RECORDSEPARATOR ---
- Permissions are the permissions to set. Can be a combination of:
- --- RECORDSEPARATOR ---
- "r"
- --- RECORDSEPARATOR ---
- allow read access
- --- RECORDSEPARATOR ---
- "w"
- --- RECORDSEPARATOR ---
- allow write access
- --- RECORDSEPARATOR ---
- "x"
- --- RECORDSEPARATOR ---
- allow execute access
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Integer.
- --- RECORDSEPARATOR ---
- Returns 1 if successful, else 0
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- ok = baSetFilePermissions( "Mac HD:data:student.dat", "u", "rw" )
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- ok := baSetFilePermissions( "Mac HD:data:student.dat", "o", "x" )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- This function only works under OSX.
- --- RECORDSEPARATOR ---
- The file permissions will be set to what you pass in - "rw" will set the read and write
- --- RECORDSEPARATOR ---
- access and remove the execute access, regardless of the present settings.
- --- RECORDSEPARATOR ---
- If you pass in a plus sign as the first character, then the permissions will be added
- --- RECORDSEPARATOR ---
- to the present permissions ΓÇô "+r" will add read access without changing the present
- --- RECORDSEPARATOR ---
- write and execute settings.
- --- RECORDSEPARATOR ---
- If you pass in a minus sign as the first character, then the permissions will be
- --- RECORDSEPARATOR ---
- removed from the present permissions ΓÇô "-wx" will remove the write and execute
- --- RECORDSEPARATOR ---
- access without changing the present read setting.
- --- RECORDSEPARATOR ---
- To set the permissions of a folder, you need to make sure that the folder name
- --- RECORDSEPARATOR ---
- ends with a :